package me.chenjp.tracker.core.bean;

/**
 * @author gaopq [peiqianggao@gmail.com]
 * @date 2018/1/9 23:37
 */
public final class StateCode {

    public static final State OK = new State(0, "接口请求成功");

    public static final State ERROR = new State(5000, "未知异常");

    public static final State PARAM_ERROR = new State(5001, "参数错误");

    public static final State NOT_FOUND = new State(4040, "资源不存在");

    public static class User {
        public static final State USER_NOT_EXIST = new State(20001, "用户不存在");

        public static final State MOBILE_VALIDATE_ERROR = new State(20002, "请输入正确的手机号");

        // 非通用的错误码可以分类放到例如 User 相关的就放到 User 内部类中，使用的时候容易查找
        public static final State USER_EXIST = new State(20003, "账号已存在");

        public static final State USER_NOT_DELETE_YOURSELF = new State(20004, "不能删除用户自己");

        public static final State PASSWORD_ERROR = new State(20005, "密码错误");
    }

    public static class Project {
        public static final State PROJECT_NOT_EXIST = new State(20101, "项目不存在");

        public static final State PROJECT_EXIST = new State(20102, "相同编号的项目已经存在");

        public static final State PROJECT_ALREADY_DELETE = new State(20103, "项目已被删除");

        public static final State PROJECT_DRUG_NAME_CAN_NOT_TURN = new State(20104, "试验药品名称不能转为缩写");
    }

    public static class ProjectUser {
        public static final State PROJECT_USER_ALREADY_EXIST = new State(20201, "项目成员已存在");
    }

    public static class File {
        public static final State FILE_FORMAT_ERROR = new State(20301, "文件格式错误");
    }

    public static class EntranceCriterion {
        public static final State CRITERION_NOT_EXIST = new State(20401, "入选/排除标准不存在");
    }

    public static class Volunteer {
        public static final State FILE_NOT_SUPPORT = new State(20501, "文件格式仅支持xlsx, xls");

        public static final State FILE_CONTENT_FORMAT_ERROR = new State(20502, "文件内容的数据格式错误");

        public static final State VOLUNTEER_NAME_NOT_TURN = new State(20503, "志愿者姓名不能转换为缩写");

        public static final State VOLUNTEER_ALREADY_EXIST = new State(20504, "志愿者已经存在了");

        public static final State PROJECT_NOT_INCLUDE_VOLUNTEER = new State(20505, "志愿者不存在");
    }

    public static class Barcode {
        public static final State BARCODE_TYPE_NOT_EXIST = new State(20601, "条码类型不存在");
    }

    public static class Record {
        public static final State RECORD_ALREADY_EXIST = new State(20701, "已经签过了");
    }

    public static class VolHeiWei {
        public static final State VOL_HEI_WEI_ALREADY_EXIST = new State(20801, "已经存在该志愿者身高体重记录");
    }

    public static class FeedDrugDetail {
        public static final State FEE_DRUG_DETAIL_NOT_EXIST = new State(20901, "给药详情记录不存在");

        public static final State PLAN_FEED_TIME_FORMAT_ERROR = new State(20902, "0h采血点数据错误，正确格式：xx:xx:xx，保证在00:00-23:59范围内");

        public static final State FEED_DRUG_DETAIL_ID_NULL = new State(20903, "给药详情id不能为空");

        public static final State FEED_DRUG_DETAIL_ALREADY_EXIST = new State(20904, "给药详情记录已存在");

        public static final State FEED_DRUG_DETAIL_NOT_HAVE_FEED_TIME = new State(20905, "本周期还未给药");
    }

    public static class CollectBlood {
        public static final State COLLECT_POINT_FORMAT_ERROR = new State(21001, "采血点应该为数字");

        public static final State COLLECT_BLOOD_PREPARATION_ALREADY_EXIST = new State(21002, "采血准备记录已经存在");

        public static final State COLLECT_TIMES_MISMATCH = new State(21003, "设置的采血点数和提交的采血点列表大小不一致");

        public static final State COLLECT_BLOOD_PREPARATION_NOT_FOUND = new State(21003, "采血准备记录不存在");
    }

    public static class Refrigerator {
        public static final State REFRIGERATOR_NOT_FOUND = new State(21101, "冰箱不存在");
    }

    public static class FaceDetectRecognition {
        public static final State DETECT_RECOGNITION_ERROR = new State(21102, "识别错误,请咨询管理员");
    }


}
